#!/usr/bin/env php

<?php
/**
 * Created by PhpStorm.
 * User: qv
 * Date: 2018/10/9 0009
 * Time: 9:47
 */

use commands\Kernel;
use BeReborn\Console\Application;
use BeReborn\Gii\GiiService;

error_reporting(E_ALL & ~E_DEPRECATED & ~E_STRICT);

define('APP_PATH', __DIR__);
define('COMMAND_PATH', APP_PATH . '/artisan');
define('DISPLAY_ERRORS', TRUE);
define('DEBUG', TRUE);

Swoole\Coroutine::create(function () {
	require_once __DIR__ . '/vendor/autoload.php';
	$app = new Application(require_once __DIR__ . '/config/config.php');
	$app->register(GiiService::class);
	$app->run(new Kernel());
});
